#ifndef __ATTRIBUTE_H_
#define __ATTRIBUTE_H_

#include <globalDecl.h>

class Attribute {
private: 
	void * m_cData;
	//char * m_cCData;
	int m_iLength;
	int m_iFree;

public:
	Attribute ();
	~Attribute ();
	void SetFree();
	void Free();
	void FreeMem();
	// write the attribute in a "flat" format to the specified memory location;
	// returns the length of the record, in bytes
	int ToBinary (char *writeToHere);

	// read the attribute from the flat, binary format; returns the number of
	// bytes that were read
	int FromBinary (char *readFromHere);

	int GetBytes();
	void SetData(string,Type);

	void Print(Type);
	void ClearData();
	int Compare(Attribute at, Type _ty, int _compare);
};

#endif

